package com.aididi.exception;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * @author ：xuzexiang
 * @description：自定义运行时异常
 * @date ： 2021/10/28 14:38
 */
@Getter
@Setter
public class BizException extends RuntimeException{

    private String errCode;
    private String errMsg;

    public BizException(String errCode) {
        super();
        this.errCode = errCode;
    }

    public BizException(String errCode, String errMsg) {
        super(errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public BizException(String errCode, String errMsg, Throwable ex) {
        super(errMsg, ex);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public BizException(Throwable ex) {
        super(ex);
    }

}
